<?php
defined('IN_IXDCW') or exit('Access Denied');
include tpl('header');
show_menu($menus);
?>
	<script type="text/javascript">
		function DriveRightScroll(){
			var RightDivObj = $('#RightScroll');
			var LeftDivObj = $('#LeftScroll');
            if (LeftDivObj.scrollTop() != RightDivObj.scrollTop() ){
                RightDivObj.scrollTop(LeftDivObj.scrollTop());
            }
		}
		function DriveLeftScroll(){
			var RightDivObj = $('#RightScroll');
			var LeftDivObj = $('#LeftScroll');
            if (LeftDivObj.scrollTop() != RightDivObj.scrollTop() ){
                LeftDivObj.scrollTop(RightDivObj.scrollTop());
            }
            if (LeftDivObj.scrollTop() != RightDivObj.scrollTop() ){
                LeftDivObj.scrollTop(RightDivObj.scrollTop());
            }
		}
	</script>
<div class="o-v">
	<div class="tt">版本对比</div>
	<h1 class="title_thema bor_b-ccc"><strong class="l"><?php echo $doc['title'];?></strong><a href=" " target="_self" class="r"></a></h1>
	<p><a href="?moduleid=4&file=edition&did=<?php echo $doc['did'];?>">返回版本管理</a></p>

	<div class="edition">
		<table width="100%">
			<tr>
				<td style="width:48%;">
					历史版本：<?php echo $edition[0]['eid'];?><br>
					创建时间：<?php echo $edition[0]['time'];?><br>
					版本创建者：<?php echo $edition[0]['author'];?><br>
					内容长度：<?php echo strlen($edition[0]['content']);?>字
				</td>
				<td style="width:48%;">
					历史版本：<?php echo $edition[1]['eid'];?><br>
					创建时间：<?php echo $edition[1]['time'];?><br>
					版本创建者：<?php echo $edition[1]['author'];?><br>
					内容长度：<?php echo strlen($edition[1]['content']);?>字
				</td>
			</tr>
		</table>
	</div>
	<div>
		<p>1、浅绿色 表示相同点</p>
		<p>2、浅紫色 表示不同点</p>
	</div>
	<div id="LeftScroll" class="LeftFrame" onscroll="DriveRightScroll()">
		<span id="LeftContent" align="left"><?php echo $edition[0]['content']; ?> </span>
	</div>
	<div id="RightScroll" class="RightFrame" onscroll="DriveLeftScroll()">
		<span id="RightContent" align="left"><?php echo $edition[1]['content']; ?> </span>
	</div>

</div>

<script type="text/javascript" src="file/script/compare.js"></script>
<script type="text/javascript">CompareById('LeftContent', 'RightContent');</script>
<script type="text/javascript">Menuon(0);</script>
<?php include tpl('footer'); ?>